home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / xpilot-3.3.1 / README.SHIPS < prev    next >
Text File  |  1995-07-08  |  10KB  |  197 lines

  1. Users can now define their own ship shape with a few limitations.
  2. The server has a new server option -allowShipShapes to enable
  3. user-defined ship shapes (the default is to enable it).
  4. The client has a new option called -shipShape <decription>.
  5. Where description defines the edges of the ship.  When the ship
  6. is drawn the edges are connected in the order they are listed
  7. in the description, with lines connecting them.  The first and last
  8. point are also connected, so your first and last point should not
  9. be the same.
  10.  
  11. The 3.1.0 version was the first XPilot version which featured
  12. user definable ship shapes.  The map format was changed in the 3.2.0 version
  13. to include more features and be more easily extensible.
  14. First the old format is explained for completeness, then the new one.
  15. The ship shape is defined as if it was rotated 90 degrees to the right.
  16.  
  17. For example, the following defines the default ship in old format:
  18.  
  19.     xpilot -shipShape '(3,1,2)(15,0)(-9,8)(-9,-8)'
  20.  
  21. Where the first parentheses surrounds a triple of numbers.
  22. The first number of this triple denotes the number of points that
  23. follow.  The second and third number of the triple define the two back
  24. points of the ship, which are marked with the marking lights.
  25. These two back points also determine where the thrust of the ship
  26. originates, namely at the mean of these points.
  27. All of the points follow, each one surrounded by parentheses.
  28. The first point should be the top point of the ship as this is the
  29. point where shots originate from (otherwise the ship will kill itself
  30. by its own shots).
  31.  
  32. The definition should meet some requirements to enforce users to define
  33. a ship which is not too small or too weird.  These restrictions are
  34. arbitrary and open to discussion.  Currently they are as follows:
  35.   1) each ship should have at least three different points and not more
  36.      than sixteen points.
  37.   2) at least one point should be eight or more pixels left from the origin.
  38.   3) at least one point should be eight or more pixels right from the origin.
  39.   4) at least one point should be eight or more pixels above the origin.
  40.   5) at least one point should be eight or more pixels below the origin.
  41.   6) at least three points should be eight or more pixels away from the origin.
  42.   7) no point may be more than fifteen pixels away from the x- or y-axis.
  43.  
  44. In the 3.2.0 XPilot version Pete Ford has come up with a new, more rational,
  45. ship-shape format.  It features:
  46.  
  47.     1. Keyword oriented system, to allow for more flexibility and future 
  48.        extension.
  49.  
  50.     2. Additional gun sites allowed on ships; main gun is relocatable and up 
  51.        to three extra gun sites are allowed on each side of the ship for wide 
  52.        angle guns.
  53.  
  54.     3. Additional marking light positions allowed - up to three for each 
  55.        color (red = left, blue = right as before).
  56.  
  57.     4. Alternative missile racks - positions where missiles launch from. Up 
  58.        to four racks can be given, and mini missiles will launch from separate
  59.        racks if available.
  60.  
  61.     5. Engine is relocatable, although it still fires along the x-axis of the 
  62.        ship as defined.
  63.  
  64.     6. Compatibility with the 3.1 ship-shape format for exisiting 3.1 clients 
  65.        joining '3.2' servers and 3.2 clients joining 3.1 servers.
  66.  
  67.     The new ship shape format is:
  68.  
  69.     xpilot*shipShape: (keyword: x1,y1 ...) (keyword: x1, y1) etc.
  70.  
  71.     Keywords can appear any number of times in the shape string; the 
  72.     behaviour is dependent on the keyword.
  73.     If a keyword is not given then a default will be applied: if the shape is 
  74.     not defined then the default shape is used.
  75.     Allowed keywords are:
  76.  
  77.     shape:  defines points for ship shape. Up to 16 points will be stored, 
  78.             any more than 16 are ignored. Points should appear as x,y pairs, 
  79.             each pair separated with at least one space character. 
  80.             Multiple 'shape:' keywords have a cumulative effect; adding extra 
  81.             points to the list, up to the limit of 16. There is no requirement
  82.             to give the number of points to expect - this is worked out after
  83.             the whole string is parsed.
  84.             The existing restrictions on separation of points apply.
  85.             If no 'shape:' keyword present then the contents of the string 
  86.             will be ignored and the default ship used.
  87.  
  88.     mainGun: defines the firing position for the main gun. Only one x,y pair 
  89.              is read; further 'mainGun:' keywords will be ignored.
  90.              Default is the foremost point in the 'shape:' list.
  91.  
  92.     leftGun: defines a firing position for an additional left-side gun. Up to 
  93.              three of these can be specified, any more will be ignored.
  94.              The left-hand part of any wide-angle shots will be fired from
  95.              these points if they exist.
  96.              Default is to have no left guns: only a main gun.
  97.  
  98.     rightGun: defines a firing position for an additional left-side gun. Up to
  99.               three of these can be specified, any more will be ignored.
  100.               The left-hand part of any wide-angle shots will be fired from
  101.               these points if they exist. There is no need for left and right
  102.               guns to balance (or even be on the correct side of the ship!)
  103.               Default is to have no right guns: only a main gun.
  104.  
  105.     leftLight: defines a position for the left (red) marking light. Up to 
  106.                three of these can be given.
  107.                Default is one light on the left-most point on the ship.
  108.  
  109.     rightLight: defines a position for the right (blue) marking light. Up to 
  110.                 three of these can be given.
  111.                 Default is one light on the right-most point on the ship.
  112.  
  113.     engine: defines the point from which the engine thrust originates. Only 
  114.             one of these points will be defined; multiple 'engine:' keywords 
  115.             will override previous positions.
  116.             Default is on the ship x-axis at the rear-most x-value defined.
  117.  
  118.     missileRack: defines a missile launch point. More than one of these will
  119.                  mean that missiles are launched from each rack in turn. This 
  120.                  works best with mini missiles (especially torpedos).
  121.                  Default is one rack at the main gun position.
  122.  
  123.     Because the ship shape string would become extremely long in the new
  124.     format short aliases for the keywords in the shipshape string are
  125.     provided.  The list of keywords together with their aliases is:
  126.  
  127.         Full version   Short Version   Meaning
  128.         ------------   -------------   -------
  129.         shape:         SH:             ship shape points
  130.         mainGun:       MG:             Main gun position
  131.         leftGun:       LG:             Left wide gun position(s)
  132.         rightGun:      RG:             Right wide gun position(s)
  133.         leftLight:     LL:             Left (red) light position(s)
  134.         rightLight:    RL:             Right (blue) light positions(s)
  135.         engine:        EN:             Engine thrust point
  136.         missileRack:   MR:             Missile launch point(s)
  137.         name:          NM:             The name of the ship
  138.  
  139.     The points given for weapons, lights etc. need not be points defined in 
  140.     the ship shape definition.
  141.  
  142.     Example:
  143.     This is my latest version of my own ship-shape (called Enigma); note that 
  144.     it should be read as one continuous string without line breaks.
  145.  
  146.     xpilot*shipShape: (shape: 15,0 -2,4 -8,13 0,13 0,14 -15,14 -12,3 -15,3 
  147.     -15,-3 -12,-3 -15,-14 0,-14 0,-13 -8,-13 -2,-4) (missileRack: 0,14 0,-14) 
  148.     (leftGun: 0,14 -5,14) (rightGun: 0,-14 -5,-14) (leftLight: -15,14 0,0) 
  149.     (rightLight: -15,-14 0,0) (engine: -15,0)
  150.  
  151.     I've tried to make the format easy to extend; extensions can be added in 
  152.     the parsing routines in math.c quite easily. Of course, the playing code 
  153.     will have to be changed to accommodate any extension.
  154.     My own ideas for improvement are to include a 'name:' string for the name 
  155.     of the ship (possibly to allow selection from a set of shapes while 
  156.     playing...) and positions for rear guns.
  157.  
  158.     Known Problems:
  159.  
  160.     1. At the moment, mini smart and heat missiles still spread from the
  161.        missile racks, so the effect is lost a little. It is probably possible
  162.        to determine whether spread is required, but I haven't done that yet.
  163.  
  164.     2. Wide angle guns all fire from additional gun positions if possible; 
  165.        they probably should use the main gun more. Also they spread in the 
  166.        same way as the existing program - of course setting Z3 on the weapons 
  167.        mods will fire in parallel lines of shots; Z3 was could almost have 
  168.        been designed for this patch!
  169.  
  170.     Thanks to those people who've made suggestions already (Bjoern & Bert).
  171.     Any comments/suggestions/bugs/bug-fixes should be sent to me:
  172.  
  173.     p.s.ford@durham.ac.uk
  174.  
  175.     The latest improvements are:
  176.  
  177.     1. Code to restrict lights,guns etc. to within the ship-shape design.
  178.        It's not perfect, but it tends to allow invalid positions rather than
  179.        disallow valid ones. Thanks to Bert for a very nice diagram of the
  180.        problem!
  181.  
  182.     Pete Ford (Enigma)
  183.  
  184. New ship shapes should obey a new size restriction.  This is because some
  185. ship-shape-artists made ships very small to have a slight advantage in
  186. manouvring in tight places.  Also, those small ships are a little less
  187. easy to spot.  Therefore the following size restriction is now enforced:
  188. the width and height of the ship added together should be at least 38.
  189. To give everybody some time to convert their ships to the new format
  190. and to adapt it to meet this restriction it is not enforced right away, but
  191. rather a warning is printed that it will be enforced in a future version.
  192.  
  193. The maximum number of ship shape points for new format ships has been
  194. increased from 16 to 24 points.  Note that if older clients connect
  195. which only support the old format they only receive the first 16 points.
  196.  
  197.